var $form=$("form");
$form.validate({
    /**
     * ignore：忽略某些元素不验证
     * @type {String}
     * 例如：ignore: ".ignore" ，忽略所有的带ignore class 的标签
     */
    ignore: ".ignore"
});
window.formObject = $form;
var houseId=common.getQueryString("houseId");
$("#houseId").val(houseId);
var houseNo=common.getQueryString("houseNo");
var $houseAudio = $("#house-audio");
var $audioPath=$("#audioPath");
var $fileName=$("#fileName");

var houseAudioGallery=$houseAudio.gallery({
    readOnly:false,
    title:"上传房源音频",
    url:window.audioHost +common.uploadAudioPath,
    paramName:"file",
    fileFolder:houseNo,
    returnPathName:"fileAccessPath",
    maxFiles:1,
    type:'audio',
    filePaths:[],
    uploadCallback:function () {
        var path=houseAudioGallery.getFilePaths();
        var fileName = houseAudioGallery.getFileNames();
        $audioPath.val(!!path.length?path.join(","):"");
        $fileName.val(!!fileName.length?fileName.join(","):"");
    },
    deleteCallback:function () {
        var path=houseAudioGallery.getFilePaths();
        var fileName = houseAudioGallery.getFileNames();
        $audioPath.val(!!path.length?path.join(","):"");
        $fileName.val(!!fileName.length?fileName.join(","):"");
    }
});